﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Master_Page/Master_IPORT.Master" CodeBehind="frm_Tracking.aspx.vb" Inherits="I_PORT.frm_Tracking" 
    title="IRPC INTELLIGENT PORT SERVICE" %>
    
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
      <asp:UpdatePanel ID="UpdatePanelTracking" runat="server">
        <ContentTemplate>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
                <td>
               
               <asp:Panel ID="panelMain" runat="server">
                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
                     <tr>
                        <td valign="top">
                           <table width="100%" border="0" cellpadding="2" cellspacing="0">
                           <tr>
                         <td style="width:100px;" align="right"><asp:Label ID="Label5" runat="server" SkinID="lbtxt" Text="Booking No. :"></asp:Label>&nbsp;</td>
                         <td align="left"><asp:TextBox ID="txtBooking_no" runat="server" ></asp:TextBox>
                         </td>
                           </tr>
                            <tr>
                         <td style="width:100px;" align="right"><asp:Label ID="Label4" runat="server" SkinID="lbtxt" Text="Vessel Name :"></asp:Label>&nbsp;</td>
                         <td align="left"><asp:TextBox ID="txtVessel" runat="server" ></asp:TextBox>
                         </td>
                           </tr>
                         </table>
                        </td>
                        <td valign="top">
                           <table width="100%" border="0" cellpadding="2" cellspacing="0">
                           <tr>
                         <td style="width:100px;" align="right"><asp:Label ID="Label70" runat="server" SkinID="lbtxt" Text="Lay Can :"></asp:Label>&nbsp;</td>
                         <td align="left"><asp:TextBox ID="txtDateSearch" runat="server" Width="80px" onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateSearch" runat="server" ImageUrl="~/Image/calendar.png" />&nbsp;<asp:Label ID="Label71" runat="server" SkinID="lbtxt" Text="TO"></asp:Label>&nbsp;<asp:TextBox ID="txtDateToSearch" runat="server" Width="80px"  onkeypress="return false;" ></asp:TextBox>&nbsp;<asp:ImageButton ID="ImgDateToSearch" runat="server"  ImageUrl="~/Image/calendar.png" />
                                <asp:CalendarExtender ID="CalendarExtenderSearch5" runat="server" TargetControlID="txtDateSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateSearch"></asp:CalendarExtender>
                                <asp:CalendarExtender ID="CalendarExtenderSearch6" runat="server" TargetControlID="txtDateToSearch" Format="dd MMM yyyy" PopupButtonID="ImgDateToSearch" ></asp:CalendarExtender>
                      </td>
                    </tr>
                     <tr>
                        <td style="width:100px;" align="right">&nbsp;</td>
                        <td align="left"><asp:Button ID="btnSearch" runat="server" Text="Search" CssClass="ButtonStyle" /></td>
                     </tr>
                           </table>
                        </td>
                     </tr>
                     <tr>
                       <td>&nbsp;</td>
                     </tr>
                 </table>
                 <table width="100%" border="0" cellpadding="2" cellspacing="0">
                <tr>
                 <td align="center">
                     <asp:GridView ID="gridTracking" runat="server" SkinID="gridblue"  DataKeyNames="Booking_no,Vehicle_Text,Date_From,Date_To,Status,MAgent_no,PORT"
                                                        AutoGenerateColumns="False">
                                                        <PagerTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgFirst" runat="server" CommandArgument="First" 
                                                                            CommandName="Page" Height="22px" ImageUrl="../Image/arrow-first.gif" 
                                                                            OnCommand="Paginate" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgBack" runat="server" Height="22px" ImageUrl="../Image/arrow-back.gif"
                                                                            OnCommand="Paginate" CommandArgument="Prev" CommandName="Page" />
                                                                    </td>
                                                                    <td valign="top">
                                                                        Page
                                                                        <asp:DropDownList ID="ddlPage" runat="server" AutoPostBack="true"
                                                                            OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                                                                        </asp:DropDownList>
                                                                        of
                                                                        <asp:Label ID="lbPageCount" runat="server" Text="Label"></asp:Label>
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgNext" runat="server" Height="22px" ImageUrl="../Image/arrow-next.gif"
                                                                            OnCommand="Paginate" CommandArgument="Next" CommandName="Page" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgEnd" runat="server" Height="22px" ImageUrl="../Image/arrow-end.gif"
                                                                            OnCommand="Paginate" CommandArgument="Last" CommandName="Page" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </PagerTemplate>
                                                        <Columns>
                                                            <asp:BoundField HeaderText="BOOKING NO." DataField="Booking_no" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" />
                                                            <asp:BoundField HeaderText="VESSEL NAME" DataField="Vehicle_Text" />
                                                            <asp:BoundField HeaderText="LAY CAN" ItemStyle-HorizontalAlign="left" ItemStyle-Width="100px" />
                                                            <asp:TemplateField HeaderText="OPERATION" ItemStyle-Width="90px">
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgOperation" CommandName="Operation" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="ACTUAL" ItemStyle-Width="60px">
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgActual" CommandName="Actual" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="FINISH" ItemStyle-Width="40px" Visible="false" >
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgFinish" CommandName="Finish" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <HeaderStyle CssClass="gvHeaderRow" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                                    </asp:GridView>
                                                    <asp:Label ID="lbAlert" runat="server" Font-Names="Tahoma" Style="color: Red; font-size: 16px;"
                                                        Visible="False"></asp:Label>
                       </td>
                </tr>
                <tr>
                   <td style="height:5px;"><img src="../Image/space.gif" /></td>
                </tr>
                <tr>
                  <td>
                     <table width="95%" border="0" cellpadding="0" cellspacing="0" >
                        <tr>
                          <td>&nbsp;</td>
                          <td style="width:150px;">
                             <fieldset>
                                   <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                     <tr>
                                       <td><img src="../Image/NotCorrect.png" title="Not Start />&nbsp;&nbsp;<asp:Label ID="notstart" runat="server" SkinID="lbtxt" Text=" = Not Start"></asp:Label></td>
                                     </tr>
                                     <tr>
                                        <td><img src="../Image/Yellow.png" title="Not Start />&nbsp;&nbsp;<asp:Label ID="Label1" runat="server" SkinID="lbtxt" Text=" = On Processing"></asp:Label></td>
                                     </tr>
                                     <tr>
                                        <td><img src="../Image/Correct.png" title="Not Start />&nbsp;&nbsp;<asp:Label ID="Label2" runat="server" SkinID="lbtxt" Text=" = Finish"></asp:Label></td>
                                     </tr>
                                   </table>
                             </fieldset>
                          </td>
                        </tr>
                     </table>
                  </td>
                </tr>
                </table>
                </asp:Panel>
                <asp:Panel ID="PanelSub" runat="server" Visible="false" >
                <table width="100%" border="0" cellpadding="2" cellspacing="0">
                <tr>
                 <td align="center">
                     <asp:GridView ID="GridSub" runat="server" SkinID="gridblue"  DataKeyNames="Booking_no,Vehicle_Text,Date_From,Date_To,Status,MAgent_no,PORT"
                                                        AutoGenerateColumns="False">
                                                        <PagerTemplate>
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgFirst" runat="server" CommandArgument="First" 
                                                                            CommandName="Page" Height="22px" ImageUrl="../Image/arrow-first.gif" 
                                                                            OnCommand="Paginate" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgBack" runat="server" Height="22px" ImageUrl="../Image/arrow-back.gif"
                                                                            OnCommand="Paginate" CommandArgument="Prev" CommandName="Page" />
                                                                    </td>
                                                                    <td valign="top">
                                                                        Page
                                                                        <asp:DropDownList ID="ddlPage" runat="server" AutoPostBack="true"
                                                                            OnSelectedIndexChanged="ddlPage_SelectedIndexChanged">
                                                                        </asp:DropDownList>
                                                                        of
                                                                        <asp:Label ID="lbPageCount" runat="server" Text="Label"></asp:Label>
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgNext" runat="server" Height="22px" ImageUrl="../Image/arrow-next.gif"
                                                                            OnCommand="Paginate" CommandArgument="Next" CommandName="Page" />
                                                                    </td>
                                                                    <td>
                                                                        <asp:ImageButton ID="ImgEnd" runat="server" Height="22px" ImageUrl="../Image/arrow-end.gif"
                                                                            OnCommand="Paginate" CommandArgument="Last" CommandName="Page" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </PagerTemplate>
                                                        <Columns>
                                                            <asp:BoundField HeaderText="BOOKING NO." DataField="Booking_no" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="80px" />
                                                            <asp:BoundField HeaderText="VESSEL NAME" DataField="Vehicle_Text" />
                                                            <asp:BoundField HeaderText="LAY CAN" ItemStyle-HorizontalAlign="left" ItemStyle-Width="100px" />
                                                            <asp:TemplateField HeaderText="OPERATION" ItemStyle-Width="90px">
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgOperation" CommandName="Operation" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="ACTUAL" ItemStyle-Width="60px">
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgActual" CommandName="Actual" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="FINISH" ItemStyle-Width="40px" Visible="false">
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgFinish" CommandName="Finish" CommandArgument="<%# Container.DataItemIndex %>"  runat="server" />
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <HeaderStyle CssClass="gvHeaderRow" ForeColor="White" HorizontalAlign="Center" VerticalAlign="Middle" Wrap="False" />
                                                    </asp:GridView>
                                                    <asp:Label ID="Label3" runat="server" Font-Names="Tahoma" Style="color: Red; font-size: 16px;"
                                                        Visible="False"></asp:Label>
                       </td>
                </tr>
                <tr>
                   <td style="height:5px;"><img src="../Image/space.gif" /></td>
                </tr>
                <tr>
                   <td>
                       <table width="95%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                           <td>
                           
                          <fieldset>
                             <asp:Panel ID="PanelOperation" runat="server" Visible="false">
                                   <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                       <tr>
                                          <td rowspan="8" style="width:20px;" >
                                             &nbsp;
                                          </td>
                                          <td rowspan="8" style="background-image:url('../Image/ship_Tracking.png');background-repeat:no-repeat;" style="width:45%;" >
                                             &nbsp;
                                          </td>
                                          <td colspan="2" align="right" >
                                              <asp:ImageButton ID="imgClose" runat="server" ImageUrl="~/Image/4090.png" />
                                          </td>
                                       </tr>
                                       <tr>
                                         <td style="width:25%;" align="right" ><asp:Label ID="lbNORSHOW" runat="server" SkinID="lbtxt" Text="NOR Tender :"></asp:Label>&nbsp;</td>
                                         <td align="left" ><asp:Image ID="imgNOR" runat="server" /></td>
                                       </tr>
                                        <tr id="rowPiliot" runat="server">
                                         <td style="width:25%;" align="right" ><asp:Label ID="lbPilot" runat="server" SkinID="lbtxt" Text="Pilot on Board/Anchor up :"></asp:Label>&nbsp;</td>
                                         <td align="left" ><asp:Image ID="imgPilot" runat="server" /></td>
                                       </tr>
                                        <tr>
                                         <td style="width:25%;" align="right" ><asp:Label ID="Label6" runat="server" SkinID="lbtxt" Text="Berth(1st line - All fast) :"></asp:Label>&nbsp;</td>
                                         <td align="left" ><asp:Image ID="imgBerth" runat="server" /></td>
                                       </tr>
                                        <tr>
                                         <td style="width:25%;" align="right" ><asp:Label ID="Label8" runat="server" SkinID="lbtxt" Text="Started  S/L,S/U :"></asp:Label>&nbsp;</td>
                                         <td align="left" ><asp:Image ID="imgStart" runat="server" /></td>
                                       </tr>
                                        <tr>
                                         <td style="width:25%;" align="right" ><asp:Label ID="Label10" runat="server" SkinID="lbtxt" Text="Finish Operation :"></asp:Label>&nbsp;</td>
                                         <td align="left" ><asp:Image ID="imgFinish" runat="server" /></td>
                                       </tr>
                                        <tr>
                                         <td style="width:25%;" align="right" ><asp:Label ID="Label14" runat="server" SkinID="lbtxt" Text="Departed :"></asp:Label>&nbsp;</td>
                                         <td align="left" ><asp:Image ID="imgDepart" runat="server" /></td>
                                       </tr>
                                       <tr>
                                         <td colspan="2" align="left" >
                                           <asp:ImageButton ID="imgSendMail" runat="server" ToolTip="Send Mail" ImageUrl="~/Image/mail2.png" />
                                         </td>
                                       </tr>
                                   </table>
                             </asp:Panel>
                             <asp:Panel ID="panelActual" runat="server" Visible="false">
                                <table width="100%" border="0" cellpadding="2" cellspacing="0">
                                       <tr>
                                          <td colspan="2" align="right" >
                                              <asp:ImageButton ID="imgCloseActual" runat="server" OnClick="imgClose_Click" ImageUrl="~/Image/4090.png" />
                                          </td>
                                       </tr>
                                       <tr>
                                          <td align="center">
                                              <asp:Label ID="lbHead" runat="server" SkinID="lbHeadReport" Text="IRPC PUBLIC CO.,LTD."></asp:Label>
                                          </td>
                                       </tr>
                                       <tr>
                                          <td align="center">
                                              <asp:Label ID="lbHead2" runat="server" SkinID="lbHeadReport" Text="SUMMARY PORT TARIFF EXPENSE"></asp:Label>
                                          </td>
                                       </tr>
                                       <tr>
                                         <td align="center">
                                           <table width="95%" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                 <td align="left"><asp:Label ID="lbShip" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                 <td align="center"><asp:Label ID="lbPilottime" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                 <td align="right"><asp:Label ID="lbLayTime" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                 
                                              </tr>
                                           </table>
                                         </td>
                                       </tr>
                                        <tr>
                                         <td align="center">
                                           <table width="95%" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                <td align="left"><asp:Label ID="lbAgent" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                <td align="center"><asp:Label ID="lbPo" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                 <td align="right"><asp:Label ID="lbWharf" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                              </tr>
                                           </table>
                                         </td>
                                       </tr>
                                       <tr>
                                         <td align="center">
                                           <table width="95%" border="0" cellpadding="0" cellspacing="0">
                                              <tr>
                                                 <td align="left"><asp:Label ID="lbLoA" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                 <td align="center"><asp:Label ID="lbGrt" runat="server" SkinID="lbtxt" ></asp:Label></td>
                                                 <td align="right"><asp:Label ID="lbdWT" runat="server" SkinID="lbtxt" ></asp:Label></td>                                                 
                                              </tr>
                                           </table>
                                         </td>
                                       </tr>
                                       <tr>
                                          <td align="center">
                                            <asp:Literal ID="LiActual" runat="server" ></asp:Literal>
                                          </td>
                                       </tr>
                                       <tr>
                                         <td align="center">
                                              <asp:ImageButton ID="btnPrint" ToolTip="Print" runat="server" ImageUrl="~/Image/printer.png" />&nbsp;&nbsp;&nbsp;
                                              <asp:ImageButton ID="btnSendMailActual" ToolTip="Send Mail" runat="server" ImageUrl="~/Image/mail2.png" />
                                         </td>
                                       </tr>
                                 </table>
                             </asp:Panel>
                          </fieldset>
                            </td> 
                          </tr>
                      </table>
                   </td>
                </tr>
                </table>
                </asp:Panel>
                
                  </td>
             </tr>
            </table>
       </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
